package com.rc.myapplication.activity;

import android.app.Fragment;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.os.Bundle;

import android.os.Handler;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.EditText;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.PopupWindow;
import android.widget.TableLayout;
import android.widget.TextView;

import androidx.annotation.Nullable;

import androidx.core.view.ViewCompat;
import androidx.fragment.app.FragmentPagerAdapter;
import androidx.fragment.app.FragmentTabHost;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;

import com.google.android.material.tabs.TabLayout;
import com.rc.myapplication.R;
import com.rc.myapplication.adapter.ImageAdapter;
import com.rc.myapplication.base.BaseActivity;
import com.rc.myapplication.fragment.HomeFragment;
import com.rc.myapplication.utils.StatusBarUtil;
import com.rc.myapplication.view.CenterShowHorizontalScrollView;

import java.util.ArrayList;
import java.util.List;

public class HomeActivity extends BaseActivity  {
    private TabLayout mTabTl;




    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        StatusBarUtil.setTranslucentStatus(HomeActivity.this);
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_home);
        setFragment();
        setTabLayout();
    }

    void setFragment(){
        FragmentManager fragmentManager = getFragmentManager();
        FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
        fragmentTransaction.add(R.id.container,new HomeFragment()).commit();
    }

    FragmentTabHost tabHost;
    View view;
    View view1;
    View view2;
    View view3;
    void setTabLayout(){
        tabHost = (FragmentTabHost) findViewById(R.id.tabHost);
        view = LayoutInflater.from(HomeActivity.this).inflate(R.layout.tab,null);

    }






}
